package a.e.b.a;

import a.c.d;
import a.c.k;
import a.e.b.c.ab;
import a.e.b.c.cb;
import a.e.b.c.o;
import a.e.b.c.s;
import a.f.cd;
import a.f.ed;
import a.i.jb;

import java.util.ArrayList;
import java.util.Collection;

public class gb
  implements s
{
  private jb a;
  public static int b;
  
  public void a(jb paramjb)
  {
    this.a = paramjb;
  }
  
  public jb b(jb paramjb)
  {
    return this.a;
  }
  
  public ab a()
  {
    return ab.c;
  }
  
  public Collection b()
  {
    ArrayList localArrayList = new ArrayList();
    localArrayList.add(new a.e.b.c.q("yfiles.type", null, "portconstraints"));
    return localArrayList;
  }
  
  public Collection c()
  {
    return new ArrayList();
  }
  
  public boolean a(o paramo)
  {
    boolean bool = i.i;
    Object localObject1 = paramo.b();
    if (!bool) {
      if ((localObject1 instanceof d))
      {
        d locald = (d)localObject1;
        a.c.q localq = paramo.e();
        k localk1 = localq.c(ed.a);
        k localk2 = localq.c(ed.c);
        Object localObject2 = (bool) || (localk1 != null) ? (cd)localk1.get(locald) : null;
        if (!bool) {}
        Object localObject3 = localk2 != null ? localk2.get(locald) : null;
        int i = (bool) || ((localObject2 == null) && (localObject3 == null)) ? 1 : 0;
        localk1 = localq.c(ed.b);
        localk2 = localq.c(ed.d);
        localObject2 = (bool) || (localk1 != null) ? (cd)localk1.get(locald) : null;
        if (!bool) {}
        localObject3 = localk2 != null ? localk2.get(locald) : null;
        int j = (bool) || ((localObject2 == null) && (localObject3 == null)) ? 1 : 0;
        if ((bool) || (i != 0)) {
          if (bool) {}
        }
        return j != 0;
      }
    }
    return false;
  }
  
  public void c(o paramo) {}
  
  public void b(o paramo)
  {
    boolean bool = i.i;
    Object localObject1 = paramo.b();
    a.c.q localq = paramo.e();
    cb localcb = paramo.d();
    if ((bool) || ((localObject1 instanceof d)))
    {
      d locald = (d)localObject1;
      k localk1 = localq.c(ed.a);
      k localk2 = localq.c(ed.c);
      cd localcd = (bool) || (localk1 != null) ? (cd)localk1.get(locald) : null;
      if (!bool) {}
      Object localObject2 = localk2 != null ? localk2.get(locald) : null;
      if (!bool)
      {
        if ((localcd != null) || (localObject2 != null))
        {
          localcb.a("PortConstraint", "http://www.yworks.com/xml/graphml");
          localcb.c("endpoint", "source");
        }
      }
      else
      {
        if (!bool) {
          if (localcd != null)
          {
            if (!bool)
            {
              if (!localcd.a()) {
                if (bool) {
                  break label227;
                }
              }
            }
            else {
              if (localcd.g()) {
                break label225;
              }
            }
            localcb.c("side", a(localcd));
            localcb.c("strong", String.valueOf(localcd.a()));
          }
        }
        label225:
        if (localObject2 != null) {
          label227:
          localcb.c("groupid", localObject2.toString());
        }
        localcb.b();
      }
      localk1 = localq.c(ed.b);
      localk2 = localq.c(ed.d);
      localcd = (bool) || (localk1 != null) ? (cd)localk1.get(locald) : null;
      if (!bool) {}
      localObject2 = localk2 != null ? localk2.get(locald) : null;
      if (!bool)
      {
        if ((localcd != null) || (localObject2 != null))
        {
          localcb.a("PortConstraint", "http://www.yworks.com/xml/graphml");
          localcb.c("endpoint", "target");
        }
      }
      else
      {
        if (!bool) {
          if (localcd != null)
          {
            if (!bool)
            {
              if (!localcd.a()) {
                if (bool) {
                  break label435;
                }
              }
            }
            else {
              if (localcd.g()) {
                break label433;
              }
            }
            localcb.c("side", a(localcd));
            localcb.c("strong", String.valueOf(localcd.a()));
          }
        }
        label433:
        if (localObject2 != null) {
          label435:
          localcb.c("groupid", localObject2.toString());
        }
        localcb.b();
      }
    }
  }
  
  String a(cd paramcd)
  {
    switch (paramcd.b())
    {
    case 1: 
      return "north";
    case 2: 
      return "south";
    case 4: 
      return "east";
    case 8: 
      return "west";
    }
    return "any_side";
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.b.a.gb

 * JD-Core Version:    0.7.0.1

 */